package examples.rrc;

class Controller extends Thread
{
    RRC rrc;

	Signal ns;  
	Signal ps ;

    Controller(RRC r) { 
	rrc = r; 
	ns = new Signal();
	ps = new Signal();
    }

    public void run()
    {
		while( true)
		{
			ns.receive();
			rrc.gate.lower.send();
		    
			ps.receive();
			rrc.gate.raise.send(); 
		}
	}
}
